package sf.md.create.factory.simple;



public class AppleHandler implements AppleFactory{

    @Override
    public AppleAbstract createApple(AppleEnum appleEnum) throws Exception {

        /**todo:这里可以结合责任链模式来提升扩展性*/
        switch(appleEnum){
            case BigApple:
                return  new BigApple();

            case SmallApple:
                //语句
                return  new SmallApple();

            default :
                throw new Exception("没有此种苹果");
        }


    }
}
